package com.sugon.modules.analyse.model.vo;

import cn.hutool.core.util.StrUtil;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @description: 设备/模具故障TOP次数统计, 用于首页
 * 设备和模具公用
 * @author: YuXD
 * @create: 2020-06-01 16:01
 **/
public class FaultTopStatVO implements Serializable {

    /**
     * 设备/模具名称
     */
    private List<String> devNames;

    /**
     * 故障次数
     */
    private List<Integer> faultTimes;

    public FaultTopStatVO() {
        this.devNames = new ArrayList<>();
        this.faultTimes = new ArrayList<>();
    }

    public void add(String devName, Integer faultTime) {
        if (StrUtil.isNotEmpty(devName) && faultTime != null) {
            this.devNames.add(devName);
            this.faultTimes.add(faultTime);
        }
    }

    public List<String> getDevNames() {
        return devNames;
    }

    public List<Integer> getFaultTimes() {
        return faultTimes;
    }
}
